import 'package:flutter/cupertino.dart';
import 'package:flutter_learn/learn/inherit/Config.dart';
import 'package:flutter_learn/learn/inherit/ConfigWidget.dart';

class ConfiguredBox extends StatelessWidget {
  const ConfiguredBox({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    print("重新构建＝＝＝＞ConfiguredBox");
    Config config = Config();
    //Config config = ConfigWidget.of(context);
    return Container(
      decoration: BoxDecoration(color: config.color),
      child: Text('Background color:${config.color}'),
    );
  }
}
